{% extends "admin/base_site.html" %}
{% load i18n static extra_functions %}
{% load admin_urls %}

{% block extrahead %}{{ block.super }}
<script type="text/javascript" src="{% url 'admin:jsi18n' %}"></script>
{% endblock %}
{% block extrastyle %}{{ block.super }}{% endblock %}
{% block bodyclass %}{{ block.super }} {{ opts.app_label }}-{{ opts.model_name }} change-form{% endblock %}
{% if not is_popup %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
&rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
&rsaquo; <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
&rsaquo; <a href="{% url opts|admin_urlname:'change' original.pk|admin_urlquote %}">{{ original|truncatewords:"18" }}</a>
&rsaquo; {% trans 'Change password' %}
</div>
{% endblock %}
{% endif %}
{% block content %}<div id="content-main">
<form class="form-horizontal" action="{{ form_url }}" method="post" id="{{ opts.model_name }}_form">{% csrf_token %}{% block form_top %}{% endblock %}
<div class="box box-info">
<div class="box-body">
<input type="text" name="username" value="{{ original.get_username }}" style="display: none" />
<div>
{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
{% if form.errors %}
    <p class="text-red">
    {% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
    </p>
{% endif %}

<p>{% blocktrans with username=original %}Enter a new password for the user <strong>{{ username }}</strong>.{% endblocktrans %}</p>

<div class="form-group">
  <label class="col-sm-2 control-label" for={{form.password1.name}}>{{form.password1.label}}</label>
  <div class="col-sm-10">
  {{ form.password1|add_class:"form-control" }}
  {{ form.password1|get_erro_field }}
  {% if form.password1.help_text %}
  <p class="help-block">{{ form.new_password1.help_text|safe }}</p>
  {% endif %}</div>
</div>

<div class="form-group">
  <label class="col-sm-2 control-label" for={{form.password2.name}}>{{form.password2.label}}</label>
  <div class="col-sm-10">
  {{ form.password2|add_class:"form-control" }}
  {{ form.password2|get_erro_field }}
  {% if form.password2.help_text %}
  <p class="help-block">{{ form.password2.help_text|safe }}</p>
  {% endif %}</div>
</div>

<div>
<div class="box-footer">
<input type="submit" value="{% trans 'Change password' %}" class="btn btn-info pull-right" />
</div>
</div>
</div>
</form></div>
{% endblock %}
